#include"TCPServer.hpp"
#include"my-shell.hpp"


int main(int argc,char*argv[])
{
    if(argc!=2)
    {
        cout<<"server serverport"<<endl;
        return 1;
    }

    my_shell shell;

    uint16_t port=stoi(argv[1]);

    TcpServer server(port);


    server.InitServer();
    server.Registration([&shell](const string &com)
    {
        shell.command(com);
    });
    server.Start();

    server.Stop();
    return 0;
}
